#pragma once

#include <windows.h>
#include <DirectXMath.h>
#include "Snapshot.h"
#include <vector>

enum Inputkey
{
	Right,
	Left,
	Forward,
	Backward,
	KeySnapshot,
	KeyClearSnapshots,
	GoToViewMode,
	GoToFreeMode,
	Upward,
	Downward,
	KeySwitchUseBumpMap,
	KeyBumpiness,
	KeySwitchRasterizer,
	KeySendRay,
	KeyToggleShowKdTree,
	KeyStepAntiAliasingMode,
	KeyToggleAntiAliasing,
	INPUTKEY_MAX
};

class ClassicSimulationInput
{
public:
	ClassicSimulationInput(HWND windowHandle);
	~ClassicSimulationInput(void);
	static LRESULT CALLBACK WndProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam );
	DirectX::XMINT2 GetMouseMovement(void);
	float GetHorizontalMovement(void);
	float GetForwardMovement(void);
	float GetVerticalMovement(void);
	int GetBumpinessManipulator(void);
	int GetNumSnapshotCommands(void);
	bool GetShouldGoToFreeMode(void);
	bool GetShouldGoToViewMode(void);
	bool GetShouldClearSnapshots(void);
	bool GetShouldSwitchUseBumpMap(void);
	bool GetShouldSwitchRasterizer(void);
	void Reset(void);
	bool GetShouldSendRay( void );
	bool GetShouldToggleShowKdTree( void );
	bool GetShouldStepAntiAliasingMode( void );
	bool GetShouldToggleAntiAliasing( void );
private:
	static ClassicSimulationInput* m_instance;

	HWND m_windowHandle;
	RECT m_windowRect;
	DirectX::XMINT2 m_relativeWindowMiddle;
	int m_windowWidth, m_windowHeight;
	DirectX::XMINT2 m_mouseMovement;
	int m_inputGiven[INPUTKEY_MAX];
};
